/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import {
    global,
    passNode,
    passNodeArray,
    unpackNonNullableNode,
    unpackNode,
    unpackNodeArray,
    assertValidPeer,
    AstNode,
    Es2pandaAstNodeType,
    KNativePointer
} from "../../reexport-for-generated"

import { Expression } from "./Expression"
import { AnnotatedExpression } from "./AnnotatedExpression"
import { AnnotationUsage } from "./AnnotationUsage"
export class ETSParameterExpression extends Expression {
     constructor(pointer: KNativePointer) {
        assertValidPeer(pointer, 79)
        super(pointer)
        console.warn("Warning: stub node ETSParameterExpression")
    }
    static createETSParameterExpression(identOrSpread?: AnnotatedExpression, initializer?: Expression): ETSParameterExpression | undefined {
        return new ETSParameterExpression(global.generatedEs2panda._CreateETSParameterExpression(global.context, passNode(identOrSpread), passNode(initializer)))
    }
    static updateETSParameterExpression(original?: ETSParameterExpression, identOrSpread?: AnnotatedExpression, initializer?: Expression): ETSParameterExpression | undefined {
        return new ETSParameterExpression(global.generatedEs2panda._UpdateETSParameterExpression(global.context, passNode(original), passNode(identOrSpread), passNode(initializer)))
    }
    get isDefaultConst(): boolean {
        return global.generatedEs2panda._ETSParameterExpressionIsDefaultConst(global.context, this.peer)
    }
    get isRestParameterConst(): boolean {
        return global.generatedEs2panda._ETSParameterExpressionIsRestParameterConst(global.context, this.peer)
    }
    get getRequiredParamsConst(): number {
        return global.generatedEs2panda._ETSParameterExpressionGetRequiredParamsConst(global.context, this.peer)
    }
    get annotations(): readonly AnnotationUsage[] {
        return unpackNodeArray(global.generatedEs2panda._ETSParameterExpressionAnnotations(global.context, this.peer))
    }
    get annotationsConst(): readonly AnnotationUsage[] {
        return unpackNodeArray(global.generatedEs2panda._ETSParameterExpressionAnnotationsConst(global.context, this.peer))
    }
}
export function isETSParameterExpression(node: AstNode): node is ETSParameterExpression {
    return node instanceof ETSParameterExpression
}